package com.ymttest.database.mapping;

import com.ymttest.database.model.wxconfig;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface wxconfigMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wxconfig
     *
     * @mbggenerated Tue Mar 31 15:27:38 CST 2020
     */
    @Insert({
        "insert into wxconfig (Id, AppType, ",
        "UserId, AppId, Secret, ",
        "Action)",
        "values (#{id,jdbcType=INTEGER}, #{appType,jdbcType=INTEGER}, ",
        "#{userId,jdbcType=INTEGER}, #{appId,jdbcType=VARCHAR}, #{secret,jdbcType=VARCHAR}, ",
        "#{action,jdbcType=INTEGER})"
    })
    int insert(wxconfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wxconfig
     *
     * @mbggenerated Tue Mar 31 15:27:38 CST 2020
     */
    @InsertProvider(type=wxconfigSqlProvider.class, method="insertSelective")
    int insertSelective(wxconfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wxconfig
     *
     * @mbggenerated Tue Mar 31 15:27:38 CST 2020
     */
    @Select({
        "select",
        "Id, AppType, UserId, AppId, Secret, Action",
        "from wxconfig",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="Id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="AppType", property="appType", jdbcType=JdbcType.INTEGER),
        @Result(column="UserId", property="userId", jdbcType=JdbcType.INTEGER),
        @Result(column="AppId", property="appId", jdbcType=JdbcType.VARCHAR),
        @Result(column="Secret", property="secret", jdbcType=JdbcType.VARCHAR),
        @Result(column="Action", property="action", jdbcType=JdbcType.INTEGER)
    })
    wxconfig selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wxconfig
     *
     * @mbggenerated Tue Mar 31 15:27:38 CST 2020
     */
    @UpdateProvider(type=wxconfigSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(wxconfig record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table wxconfig
     *
     * @mbggenerated Tue Mar 31 15:27:38 CST 2020
     */
    @Update({
        "update wxconfig",
        "set AppType = #{appType,jdbcType=INTEGER},",
          "UserId = #{userId,jdbcType=INTEGER},",
          "AppId = #{appId,jdbcType=VARCHAR},",
          "Secret = #{secret,jdbcType=VARCHAR},",
          "Action = #{action,jdbcType=INTEGER}",
        "where Id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(wxconfig record);
}